// wizard.h
// wizard class prototype header.


#ifndef WIZARD_H 
#define WIZARD_H

#include <SDL/SDL.h>
#include <vector>

#include "object.h"

class Wizard : public Object {
	public:
		Wizard();
		Wizard(const unsigned int, const unsigned int, const unsigned int);
		~Wizard();
		
		void draw();
		void activate();
		void tick();
		ObjectType getObjectType();
		
		void calculatePaths();
		bool getIsReachable(const unsigned int, const unsigned int);
		void setPath(unsigned int, unsigned int);
		unsigned int getPathSize();
		
		unsigned int getClientId();
		bool getHasCast();
		void setHasCast(bool hasCast);
		bool getHasMoved();
		void setHasMoved(bool hasMoved);
		bool getIsMyTurn();
		void setIsMyTurn(bool isMyTurn);
		bool getIsAlive();
		void setIsAlive(bool isAlive);
		
	private:
		bool isAlive_;
		unsigned int speed_;
		unsigned int clientId_;
		
		bool hasCast_;
		bool hasMoved_;
		bool isMyTurn_;
		
		void loadImages();
		void unloadImages();
		
		void calculatePathsRecur(unsigned int** const, const unsigned int,
		                         const unsigned int, const Direction,
		                         const unsigned int);
		
		Direction** directions_;
		std::vector<Direction> path_;
		unsigned char faceDirection_;
		unsigned int steps_;
		SDL_Surface* south_;
		SDL_Surface* north_;
		SDL_Surface* west_;
		SDL_Surface* east_;
		
		SDL_Surface* walkSouth_ [8];
		SDL_Surface* walkNorth_ [8];
		SDL_Surface* walkWest_ [8];
		SDL_Surface* walkEast_ [8];
		
};

#endif // WIZARD_H

